package com.yijushequ.dao.impl;

import com.yijushequ.dao.BaseUserDao;
import com.yijushequ.domain.BaseUser;
import org.springframework.stereotype.Repository;

/**
 * Created by IntelliJ IDEA.
 * User: Benson
 * Date: 11-8-7
 * Time: 下午8:23
 * To change this template use File | Settings | File Templates.
 */
@Repository("baseUserDao")
public class BaseUserDaoImpl extends ModelDaoImpl<BaseUser> implements BaseUserDao {


    public BaseUser findByOpenId(String openId) {
        return findFist("From BaseUser u where u.openId=?",openId);
    }

    public BaseUser findByNickName(String nickName) {
        return findFist("From BaseUser u where u.nickName=?",nickName);
    }
}
